Data Analysis Presented by:
¶

Average GPA for the entire subject of MATH in Spring 2023: 2.3, which is a C+, with the hardest subject being MATH 143 with a 1.7¶


Average Withdrawal Rate for any individual class for the entire subject of MATH in Spring 2022 is 24.78% ¶


Standard Deviation in the context of the subject tells us about the SPREAD OF GRADES THAT STUDENTS RECEIVED IN EACH CLASS as a whole, which was 1.28. This can be can considered quite high and indicate that there are a significant number of both very high and very low grades, or it might mean that grades are distributed quite evenly across the range from low to high. It should also be noted that in this subject there is usually different grading systems in the form of a curve or a grade distrubution around the average score of a class¶


Nonetheless, if the distribution of scores is approximately normal (i.e., follows a bell curve), the empirical rule states:¶

  • About 68% of the data falls within one standard deviation of the mean. Thus, 68% of scores would be within mean −1.28 to mean +1.28
  • About 95% falls within two standard deviations
  • About 99.7% falls within three standard deviations


Bringing it all together:¶

  • If the AVERAGE GPA of a math class is 2.3 and the AVERAGE STANDARD DEVIATION is 1.28, that means that on average, 68% of students who COMPLETE a math class will get a GPA ranging from 1.0 to 3.6 .


IMPORTANT FUNCTIONS USED IN THIS NOTEBOOK:¶

  • gpa_letter_converter(), which takes in a gpa and converts it into a letter grade
  • calculate_average_gpas(), which automates the process of going through every class number and every professor for every class number
  • calculate_teacher_gpas(), which automates the process of going through every teacher in a subject irrespective of class number, getting their gpa, and comparing it to the average gpa for the entire subject

Note: These will be used for doing the rest of the analysis of subjects by class!
¶

SCROLL DOWN FOR DATA VISUALIZATIONS AND INDIVIDUAL STATS ON TEACHERS!¶

Also, check this website out to get some basics on formating text with Jupyter notebook!¶

  • https://www.earthdatascience.org/courses/intro-to-earth-data-science/file-formats/use-text-files/format-text-with-markdown-jupyter-notebook/
In [1]:
import pandas as pd
import numpy as np
url = url = "https://docs.google.com/spreadsheets/d/1mS6khEB6m8cPNenNvY9Tg6bJ6YkmcvCI/export?format=csv&gid=1327379612"
df = pd.read_csv(url)
df.head()
Out[1]:
TERM SUBJECT NBR COURSE NAME SECTION PROF TOTAL A+ A A- ... B B- C+ C C- D F W INC/NA AVG GPA
0 S2023 AACS 107 Immigrant Communities Queens 1 KHANDELWAL, M 13 0 1 5 ... 1 0 0 0 0 0 0 1 0 3.643
1 S2023 ACCT 100 Fin & Mgr Acct 1 HO, V 20 0 5 3 ... 5 3 0 0 0 0 0 3 0 3.382
2 S2023 ACCT 101 Intro Thry & Prac of Acct I 11 CHAN, J 29 0 13 1 ... 5 0 2 0 0 1 0 4 0 3.448
3 S2023 ACCT 101 Intro Thry & Prac of Acct I 8 FEISULLIN, A 40 5 2 5 ... 3 3 8 2 0 0 2 5 1 2.918
4 S2023 ACCT 101 Intro Thry & Prac of Acct I 9 SUN, F 40 0 2 10 ... 5 0 1 1 3 5 2 6 1 2.634

5 rows × 21 columns

In [2]:
analysis_df = df.drop(columns = ['TERM','SECTION','INC/NA'])
analysis_df
Out[2]:
SUBJECT NBR COURSE NAME PROF TOTAL A+ A A- B+ B B- C+ C C- D F W AVG GPA
0 AACS 107 Immigrant Communities Queens KHANDELWAL, M 13 0 1 5 0 1 0 0 0 0 0 0 1 3.643
1 ACCT 100 Fin & Mgr Acct HO, V 20 0 5 3 1 5 3 0 0 0 0 0 3 3.382
2 ACCT 101 Intro Thry & Prac of Acct I CHAN, J 29 0 13 1 3 5 0 2 0 0 1 0 4 3.448
3 ACCT 101 Intro Thry & Prac of Acct I FEISULLIN, A 40 5 2 5 4 3 3 8 2 0 0 2 5 2.918
4 ACCT 101 Intro Thry & Prac of Acct I SUN, F 40 0 2 10 3 5 0 1 1 3 5 2 6 2.634
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
2403 URBST 371W VT: Service Learning Project GOLDFISCHER, E 23 4 7 3 2 3 2 0 0 1 0 0 1 3.536
2404 URBST 373W Spec. Problems-Environ Studies CONSTANTINIDES, C 20 7 10 0 0 0 0 0 0 0 0 0 3 4.000
2405 WGS 101W Intro Women & Gender Studies GIARDINA, C 25 0 6 7 4 4 1 0 0 0 0 0 2 3.536
2406 WGS 101W Intro Women & Gender Studies GIARDINA, C 25 0 5 5 5 2 1 1 0 1 1 1 3 3.123
2407 WGS 201W Theories of Feminism CRANDALL, E 15 0 3 4 0 0 1 2 1 1 0 0 3 3.150

2408 rows × 18 columns

All Main Functions Below:¶

The isinstance() function returns True if the specified object is of the specified type, otherwise False (https://stackoverflow.com/questions/1549801/what-are-the-differences-between-type-and-isinstance)¶

In pandas, both unique and nunique are used to get unique values of a series object, but they serve different purposes and return different types of output:¶

  • unique(): This function returns an array of all unique values in the order that they appear in the original DataFrame or Series. It's useful when you want to see or use the actual unique values (https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.unique.html)

  • nunique(): This function returns an integer that represents the number of unique values. It's useful when you just want to know how many unique values exist, rather than what those unique values are (https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.nunique.html)

iloc[]:¶

  • Purely integer-location based indexing for selection by position (https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.iloc.html)

sort_values():¶

  • Sort by values along either axis (https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.sort_values.html)

extend():¶

  • Adds the specified list elements (or any iterable) to the end of the current list https://www.w3schools.com/python/ref_list_extend.asp

np.std():¶

  • Compute the standard deviation along the specified axis https://numpy.org/doc/stable/reference/generated/numpy.std.html
In [3]:
def gpa_letter_converter(gpa):
    letter_grades = {
        "A": 4.0, 
        "A-": (3.7, 3.8, 3.9), 
        "B+": (3.3, 3.4, 3.5, 3.6), 
        "B": (3.0, 3.1, 3.2), 
        "B-": (2.7, 2.8, 2.9), 
        "C+": (2.3, 2.4, 2.5, 2.6),
        "C": (2.0, 2.1, 2.2), 
        "C-": (1.7, 1.8, 1.9),
        "D": (1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6),
        "F": (0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9)
    }
    for letter_grade, number_grade in letter_grades.items():
        if isinstance(number_grade, float) and gpa == number_grade:
            return letter_grade
        elif isinstance(number_grade, tuple) and gpa in number_grade:
            return letter_grade
    
    return None

def calculate_average_gpas(df):
    # Prepare a list to store the results
    results = []

    # GPA equivalents for each letter grade
    letter_grades_to_gpa = {
        "A+": 4.0,
        "A": 4.0,
        "A-": 3.7,
        "B+": 3.3,
        "B": 3.0,
        "B-": 2.7,
        "C+": 2.3,
        "C": 2.0,
        "C-": 1.7,
        "D": 1.0,
        "F": 0.0
    }

    # Loop over all unique course numbers
    for class_nbr in df["NBR"].unique():
        # Filter the DataFrame for the current course number
        df_nbr = df[df["NBR"] == class_nbr]

        # Loop over all unique professors for the current course number
        for prof in df_nbr["PROF"].unique():
            # Filter the DataFrame for the current professor
            df_prof = df_nbr[df_nbr["PROF"] == prof]

            # Calculate the average GPA for the current professor and course number
            avg_gpa_prof = round(df_prof["AVG GPA"].mean(), 1)

            # Convert the individual grade counts to GPA equivalents and calculate the standard deviation
            gpa_distributions = []
            for grade_letter, gpa in letter_grades_to_gpa.items():
                gpa_distributions.extend([gpa] * df_prof[grade_letter].sum())
            std_dev_gpa_prof = round(np.std(gpa_distributions), 2)

            # Append the result to the list
            results.append({
                "CLASS NUMBER": class_nbr,
                "PROF": prof,
                "AVG GPA PROF": avg_gpa_prof,
                "AVG GPA PROF LETTER": gpa_letter_converter(avg_gpa_prof),
                "STD DEV GPA PROF": std_dev_gpa_prof
            })

        # If there is more than one professor for this course, calculate the average GPA for the current course number, regardless of the professor
        if df_nbr["PROF"].nunique() > 1:
            avg_gpa_nbr = round(df_nbr["AVG GPA"].mean(), 1)

            # Convert the individual grade counts to GPA equivalents and calculate the standard deviation
            gpa_distributions = []
            for grade_letter, gpa in letter_grades_to_gpa.items():
                gpa_distributions.extend([gpa] * df_nbr[grade_letter].sum())
            std_dev_gpa_nbr = round(np.std(gpa_distributions), 2)

            # Append the result to the list
            results.append({
                "CLASS NUMBER": class_nbr,
                "PROF": "All Professors",
                "AVG GPA PROF": avg_gpa_nbr,
                "AVG GPA PROF LETTER": gpa_letter_converter(avg_gpa_nbr),
                "STD DEV GPA PROF": std_dev_gpa_nbr
            })

    # Convert the list of results to a DataFrame
    df_results = pd.DataFrame(results)
    
    # Find the hardest class based on average GPA
    hardest_class = df_results[df_results["PROF"] == "All Professors"].sort_values("AVG GPA PROF").iloc[0]

    # Calculate the average GPA for the entire subject
    avg_gpa_subject = round(df["AVG GPA"].mean(), 1)

    print(f"Average GPA for this entire subject in Spring 2023 is: {avg_gpa_subject}, which is a {gpa_letter_converter(avg_gpa_subject)}")
    print(f"The hardest class based on average GPA in Spring 2023 is class number: {hardest_class['CLASS NUMBER']} with an average GPA of {hardest_class['AVG GPA PROF']}, which is a {hardest_class['AVG GPA PROF LETTER']}")
    print("\nStandard deviation tells us about the spread of the grades that students received in each class. A higher standard deviation indicates a wider range of grades, while a lower standard deviation indicates that grades were more closely clustered around the average.")

    return df_results

def calculate_teacher_gpas(df):
    # Prepare a list to store the results
    results = []

    # GPA equivalents for each letter grade
    letter_grades_to_gpa = {
        "A+": 4.0,
        "A": 4.0,
        "A-": 3.7,
        "B+": 3.3,
        "B": 3.0,
        "B-": 2.7,
        "C+": 2.3,
        "C": 2.0,
        "C-": 1.7,
        "D": 1.0,
        "F": 0.0
    }

    # Loop over all unique professors
    for prof in sorted(df["PROF"].unique()):
        # Filter the DataFrame for the current professor
        df_prof = df[df["PROF"] == prof]

        # Calculate the average GPA for the current professor
        avg_gpa_prof = round(df_prof["AVG GPA"].mean(), 1)

        # Convert the individual grade counts to GPA equivalents and calculate the standard deviation
        gpa_distributions = []
        for grade_letter, gpa in letter_grades_to_gpa.items():
            gpa_distributions.extend([gpa] * df_prof[grade_letter].sum())
        std_dev_gpa_prof = round(np.std(gpa_distributions), 1)

        # Calculate the percentage of students who withdrew for the current professor
        withdraw_percentage = df_prof["W"].sum() / df_prof["TOTAL"].sum()

        # Append the result to the list
        results.append({
            "PROF": prof,
            "AVG GPA PROF": avg_gpa_prof,
            "AVG GPA PROF LETTER": gpa_letter_converter(avg_gpa_prof),
            "STD DEV GPA PROF": std_dev_gpa_prof,
            "NUM OF CLASSES": len(df_prof),
            "WITHDRAW PERCENTAGE": round(withdraw_percentage * 100, 1)
        })

    # Convert the list of results to a DataFrame
    df_results = pd.DataFrame(results)

    # Calculate the average GPA for the entire subject
    avg_gpa_subject = round(df["AVG GPA"].mean(), 1)

    # Calculate the average standard deviation for the entire subject
    gpa_distributions = []
    for grade_letter, gpa in letter_grades_to_gpa.items():
        gpa_distributions.extend([gpa] * df[grade_letter].sum())
    avg_std_dev_subject = round(np.std(gpa_distributions), 1)
    
    # Calculate the average withdrawal percentage for the entire subject
    withdraw_percentage_subject = round((df["W"].sum() / df["TOTAL"].sum()) * 100, 2)
    
    # Find the professors who teach more than one class, have a GPA that is the same or higher than the subject average GPA,
    # and for whom less than 40% of students withdrew
    best_profs = df_results[(df_results["NUM OF CLASSES"] > 1) & (df_results["AVG GPA PROF"] >= avg_gpa_subject) & (df_results["WITHDRAW PERCENTAGE"] <= withdraw_percentage_subject)]

    print(f"Professors who teach more than one class, have a GPA that is the same or higher than the subject average GPA ({avg_gpa_subject}), and have a withdrawal percentage that is less or equal than the subject average withdrawal percentage ({withdraw_percentage_subject}%):\n")
    print(best_profs, "\n")
    print("Note: This ignores rate my professor ratings. This is soley based on GPA and it doesn't consider how much students actually learn from these teachers!")
    print(f"Average standard deviation of GPA for all teachers in this subject in Spring 2023 is: {avg_std_dev_subject}")

    return df_results

dropna():¶

  • Remove missing values (https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.dropna.html)
In [4]:
analysis_df = analysis_df.dropna(subset = "PROF")
analysis_df = analysis_df[analysis_df["AVG GPA"] != 0]
math_df = analysis_df[analysis_df["SUBJECT"] == "MATH"]
pd.set_option('display.max_rows', None)
math_df
Out[4]:
SUBJECT NBR COURSE NAME PROF TOTAL A+ A A- B+ B B- C+ C C- D F W AVG GPA
1670 MATH 110 Math Literacy ALI, M 32 13 3 3 1 3 1 1 1 0 0 0 4 3.631
1671 MATH 110 Math Literacy ALI, M 31 10 3 0 3 2 1 3 1 1 0 0 6 3.383
1672 MATH 110 Math Literacy LASKER, M 32 4 4 2 4 1 6 2 0 1 2 2 4 2.861
1673 MATH 110 Math Literacy GILLMAN, P 40 2 0 3 1 1 0 1 3 1 4 10 13 1.515
1674 MATH 110 Math Literacy GILLMAN, P 40 0 1 0 0 2 1 0 2 3 9 11 9 1.062
1675 MATH 114 Elementary Prob&Stat CHOW, J 11 3 0 1 0 1 1 2 0 0 1 0 2 3.000
1676 MATH 115 College Algebra for Precalc ALI, M 28 4 7 5 1 0 1 1 2 1 1 0 5 3.370
1677 MATH 115 College Algebra for Precalc UDDIN, J 23 2 5 1 3 2 1 0 3 1 0 3 2 2.762
1678 MATH 115 College Algebra for Precalc NAKAYAMA, A 35 8 1 1 4 2 1 1 1 2 3 4 6 2.582
1679 MATH 115 College Algebra for Precalc JOANIDHI, Z 20 0 2 3 0 2 2 0 1 2 0 2 5 2.564
1680 MATH 115 College Algebra for Precalc OSTROWSKY, A 27 2 4 0 2 1 1 1 1 2 3 2 8 2.474
1681 MATH 115 College Algebra for Precalc TOBAR, J 35 0 2 3 2 3 1 0 2 3 6 1 9 2.283
1682 MATH 115 College Algebra for Precalc XU, R 20 2 1 0 0 2 1 4 2 0 4 2 1 2.106
1683 MATH 115 College Algebra for Precalc LEHMAN, S 17 0 2 1 0 0 2 0 2 1 2 2 5 2.067
1684 MATH 115 College Algebra for Precalc KALRA, P 16 0 0 3 1 0 1 1 2 1 1 3 3 2.008
1685 MATH 115 College Algebra for Precalc BERGER, K 34 3 2 1 1 0 0 2 2 0 6 6 11 1.809
1686 MATH 115 College Algebra for Precalc BOTEJU, W 35 0 1 4 1 0 0 2 2 2 4 7 9 1.657
1687 MATH 115 College Algebra for Precalc LEHMAN, S 18 0 0 0 0 1 2 2 1 0 4 2 4 1.583
1688 MATH 115 College Algebra for Precalc PORCHETTA, E 30 0 3 0 0 2 1 1 1 3 0 9 9 1.505
1689 MATH 115 College Algebra for Precalc TOBAR, J 16 0 0 0 0 0 0 0 4 0 1 1 8 1.500
1690 MATH 115 College Algebra for Precalc BOTEJU, W 35 1 1 1 2 1 2 3 0 0 3 13 8 1.356
1691 MATH 115 College Algebra for Precalc WOLF-SONKIN, V 27 0 0 2 0 1 0 0 2 1 1 6 12 1.315
1692 MATH 115 College Algebra for Precalc SHEN, T 28 0 1 0 0 0 2 2 2 1 2 9 8 1.142
1693 MATH 115 College Algebra for Precalc WOLF-SONKIN, V 30 0 0 0 1 1 1 0 0 0 1 9 15 0.769
1694 MATH 119 Math for Elem School Teachers GREENMAN, J 25 5 5 0 4 3 0 2 2 1 0 1 2 3.152
1695 MATH 119 Math for Elem School Teachers RICCARDO, M 30 6 3 5 2 5 0 0 1 1 2 1 4 3.146
1696 MATH 119 Math for Elem School Teachers KLOSIN, K 27 1 7 4 3 3 0 0 3 2 3 1 0 2.893
1697 MATH 119 Math for Elem School Teachers CHOW, J 24 1 0 5 1 6 2 4 1 0 0 2 2 2.745
1698 MATH 119 Math for Elem School Teachers BERGER, K 28 2 2 4 2 5 2 2 0 1 1 3 4 2.713
1699 MATH 119 Math for Elem School Teachers CHOW, J 20 0 5 4 1 0 2 0 0 0 1 4 3 2.618
1700 MATH 119 Math for Elem School Teachers LIN, Y 22 2 4 1 0 2 1 2 1 0 4 1 4 2.611
1701 MATH 119 Math for Elem School Teachers LI, H 30 1 2 1 1 2 2 2 1 0 6 5 7 1.870
1702 MATH 120 Discrete Math Comp Sci TERILLA, J 25 1 6 4 1 4 1 0 4 1 0 1 2 3.065
1703 MATH 120 Discrete Math Comp Sci GOLDMAN, S 28 0 5 3 6 3 3 0 3 1 0 1 3 3.028
1704 MATH 120 Discrete Math Comp Sci GONZALEZ, R 30 3 3 1 2 1 2 2 5 2 1 0 7 2.805
1705 MATH 120 Discrete Math Comp Sci LEE, H 25 2 0 1 2 2 7 2 2 3 2 0 2 2.561
1706 MATH 120 Discrete Math Comp Sci LEE, D 30 0 0 4 7 2 0 1 1 4 3 1 7 2.522
1707 MATH 120 Discrete Math Comp Sci TOBAR, J 35 0 4 2 4 1 0 1 2 1 2 3 15 2.480
1708 MATH 120 Discrete Math Comp Sci GONZALEZ, R 35 3 2 0 5 2 0 3 3 3 2 3 9 2.404
1709 MATH 120 Discrete Math Comp Sci BERGER, K 35 3 0 4 2 2 5 2 2 1 4 3 7 2.400
1710 MATH 120 Discrete Math Comp Sci SABITOVA, M 29 1 2 0 0 2 0 0 8 0 2 3 11 2.000
1711 MATH 120 Discrete Math Comp Sci GONZALEZ, R 30 1 1 0 0 1 3 1 1 3 4 3 12 1.806
1712 MATH 120 Discrete Math Comp Sci SHEN, T 28 1 0 2 1 0 1 2 1 5 5 3 7 1.786
1713 MATH 120 Discrete Math Comp Sci BOTEJU, W 35 1 2 2 0 1 3 2 3 1 3 8 9 1.762
1714 MATH 122 Precalculus CAI, A 25 5 3 4 1 1 2 0 2 0 0 0 0 3.472
1715 MATH 122 Precalculus BROGES, A 20 2 2 1 1 3 3 0 1 0 3 0 4 2.819
1716 MATH 122 Precalculus LIU, Z 23 3 1 0 3 1 4 2 0 4 0 1 4 2.689
1717 MATH 122 Precalculus COLON, C 25 2 3 2 1 0 2 1 1 0 2 2 9 2.650
1718 MATH 122 Precalculus SPITZ, H 30 3 3 2 1 1 1 2 1 5 2 2 7 2.500
1719 MATH 122 Precalculus ARCHETTI, M 30 0 4 1 2 5 3 1 0 2 2 3 7 2.483
1720 MATH 122 Precalculus OZKAN, E 33 0 3 3 3 0 0 1 1 3 2 2 14 2.467
1721 MATH 122 Precalculus MARKOWITZ, E 33 2 4 2 0 3 2 2 2 3 2 3 7 2.460
1722 MATH 122 Precalculus FLYNN, D 33 4 2 0 1 3 3 5 5 3 3 2 2 2.387
1723 MATH 122 Precalculus JOSEPH, M 28 2 1 1 1 1 0 0 1 2 0 3 15 2.283
1724 MATH 122 Precalculus TOLEDO, D 28 2 1 1 1 1 0 0 1 2 0 3 15 2.283
1725 MATH 122 Precalculus BEGA, J 33 3 2 0 1 1 1 2 4 3 3 3 10 2.161
1726 MATH 122 Precalculus LEE, H 18 2 0 1 0 0 0 2 4 3 3 0 3 2.160
1727 MATH 122 Precalculus LEE, D 30 0 1 1 2 3 4 0 2 6 2 4 5 2.012
1728 MATH 122 Precalculus CLARKE, A 19 0 1 1 1 0 0 1 1 0 1 3 10 1.811
1729 MATH 122 Precalculus YUABOV, D 34 1 3 0 1 2 0 1 1 0 1 8 16 1.700
1730 MATH 122 Precalculus OZKAN, E 32 0 1 0 1 2 0 4 2 3 4 4 10 1.695
1731 MATH 122 Precalculus TOLEDO, D 33 0 2 1 0 3 0 0 2 1 1 7 15 1.612
1732 MATH 122 Precalculus BEGA, J 33 0 0 1 2 1 0 1 3 2 5 5 13 1.500
1733 MATH 122 Precalculus DHARMA, J 31 2 0 1 1 0 2 0 1 0 0 10 12 1.318
1734 MATH 122 Precalculus GANT, S 29 1 0 1 0 2 0 1 3 1 0 10 10 1.247
1735 MATH 122 Precalculus DHARMA, J 33 0 1 0 0 0 2 0 5 2 0 9 13 1.200
1736 MATH 122 Precalculus CLARKE, A 20 0 0 0 0 1 0 0 1 0 4 4 9 0.900
1737 MATH 128 Mathematical Design HANUSA, C 23 4 2 2 2 0 0 1 0 0 2 0 10 3.254
1738 MATH 131 Calculus with Applications I GJONLEKAJ, M 20 1 2 3 4 2 0 0 2 0 0 1 5 3.087
1739 MATH 131 Calculus with Applications I GREENMAN, J 25 3 2 2 0 1 2 0 0 2 0 4 9 2.450
1740 MATH 131 Calculus with Applications I GREENMAN, J 30 0 4 0 0 1 1 0 2 2 5 2 13 2.006
1741 MATH 131 Calculus with Applications I GREENMAN, J 20 1 1 0 0 2 0 1 2 4 5 2 2 1.783
1742 MATH 132 Calc Appl Soc Sci II GOLDMAN, S 13 2 0 2 1 1 0 1 1 0 1 1 2 2.700
1743 MATH 141 Calculus/Differentiation SULTAN, Z 15 2 2 1 1 1 2 1 0 0 0 0 4 3.370
1744 MATH 141 Calculus/Differentiation WEN, C 30 6 6 2 3 2 2 1 2 0 0 2 4 3.192
1745 MATH 141 Calculus/Differentiation ERLBAUM, S 30 1 5 1 4 3 2 0 0 2 3 1 7 2.805
1746 MATH 141 Calculus/Differentiation FLYNN, D 30 2 4 2 2 6 2 1 4 1 2 1 3 2.793
1747 MATH 141 Calculus/Differentiation KALRA, P 21 0 1 2 2 2 2 1 4 1 1 0 4 2.650
1748 MATH 141 Calculus/Differentiation WEN, C 30 3 1 2 1 4 4 0 0 3 3 1 8 2.618
1749 MATH 141 Calculus/Differentiation LORD, A 29 1 2 3 4 1 1 1 0 2 0 4 9 2.511
1750 MATH 141 Calculus/Differentiation BROGES, A 20 2 2 2 4 0 1 0 0 1 4 2 2 2.500
1751 MATH 141 Calculus/Differentiation WANG, A 30 3 2 2 2 3 0 1 2 1 3 4 7 2.348
1752 MATH 141 Calculus/Differentiation LI, H 30 1 2 1 3 1 1 2 1 7 2 2 7 2.252
1753 MATH 141 Calculus/Differentiation KIMATOV, M 30 4 0 3 1 1 2 2 2 1 4 4 5 2.213
1754 MATH 141 Calculus/Differentiation MILLER, R 29 0 0 0 0 3 2 0 1 3 2 2 14 1.808
1755 MATH 141 Calculus/Differentiation LEE, D 20 1 0 0 1 1 1 0 2 2 1 3 8 1.783
1756 MATH 141 Calculus/Differentiation NICASTRO, S 29 2 1 1 0 2 0 3 3 2 4 6 5 1.750
1757 MATH 141 Calculus/Differentiation NEVAREZ, B 30 0 2 0 0 2 1 3 3 2 1 7 9 1.619
1758 MATH 141 Calculus/Differentiation GANT, S 30 0 0 0 1 0 1 3 1 3 5 3 12 1.471
1759 MATH 142 Calculus/Integration ERLBAUM, S 35 1 6 4 3 0 5 0 1 3 1 2 9 2.858
1760 MATH 142 Calculus/Integration ERLBAUM, S 35 2 6 2 2 3 7 1 2 1 1 3 5 2.763
1761 MATH 142 Calculus/Integration RONG, Y 25 2 0 0 3 1 1 2 3 3 5 2 3 2.014
1762 MATH 142 Calculus/Integration GANGARAM, E 30 1 0 0 0 7 2 2 5 1 2 5 5 1.948
1763 MATH 142 Calculus/Integration KOROVESHI, B 28 0 1 1 0 1 2 4 6 4 2 5 2 1.773
1764 MATH 142 Calculus/Integration KOROVESHI, B 30 1 1 0 1 1 0 3 3 8 0 7 5 1.632
1765 MATH 143 Calculus-Infinite Series ERLBAUM, S 31 2 4 1 1 1 1 4 3 0 6 5 2 2.068
1766 MATH 143 Calculus-Infinite Series WILSON, S 24 0 0 0 1 4 5 1 2 2 0 4 5 2.026
1767 MATH 143 Calculus-Infinite Series BRAUN, M 28 1 3 0 3 0 0 4 2 1 4 9 1 1.659
1768 MATH 143 Calculus-Infinite Series ADRIAN, M 29 1 2 0 0 1 0 1 3 2 2 6 11 1.594
1769 MATH 143 Calculus-Infinite Series BRAUN, M 27 3 0 0 3 2 1 0 0 1 2 10 5 1.559
1770 MATH 143 Calculus-Infinite Series BERMAN, G 20 0 1 1 0 1 1 2 1 2 0 9 1 1.300
1771 MATH 151 Calc/Diff & Integtn SPITZ, H 35 1 3 1 2 0 4 1 1 5 0 7 10 1.996
1772 MATH 151 Calc/Diff & Integtn SABITOVA, M 30 1 5 0 1 0 0 1 8 0 1 7 5 1.942
1773 MATH 151 Calc/Diff & Integtn SPITZ, H 34 1 1 2 1 2 0 1 4 2 4 8 8 1.631
1774 MATH 152 Calc/Integration & Infinite ZAKERI, S 32 2 2 2 2 2 5 2 3 1 0 5 6 2.377
1775 MATH 152 Calc/Integration & Infinite MILLER, D 24 1 0 2 1 1 1 1 1 0 1 4 11 1.977
1776 MATH 152 Calc/Integration & Infinite NEVAREZ, B 32 1 1 1 2 1 0 2 2 0 2 5 15 1.876
1777 MATH 152 Calc/Integration & Infinite MILLER, D 25 1 1 1 0 0 1 2 0 3 1 6 9 1.569
1778 MATH 152 Calc/Integration & Infinite DHARMA, J 13 0 0 0 1 0 0 0 0 2 0 4 6 0.957
1779 MATH 201 Multivariable Calculus MITRA, S 21 1 3 0 3 1 6 5 0 0 0 0 0 2.979
1780 MATH 201 Multivariable Calculus JOSEPH, M 30 4 2 3 0 4 2 0 2 4 0 2 7 2.752
1781 MATH 201 Multivariable Calculus BERMAN, G 15 2 2 0 0 0 0 0 1 4 3 2 1 1.986
1782 MATH 202 Advanced Calculus SARIC, D 13 1 3 0 3 0 2 0 1 0 0 2 1 2.775
1783 MATH 202 Advanced Calculus ADRIAN, M 29 4 2 1 0 3 4 3 2 3 2 2 3 2.519
1784 MATH 205 Mathematical Problem Solving GANGARAM, E 17 0 1 1 0 1 2 2 1 3 1 0 5 2.400
1785 MATH 220 Discrete Mathematics MILLER, D 18 3 2 0 5 3 2 1 0 0 1 0 1 3.188
1786 MATH 223 Diff Equa/Num Meth 1 BRAUN, M 20 1 2 2 0 2 3 0 0 3 2 5 0 2.030
1787 MATH 231 Linear Algebra I ZAKERI, S 32 4 5 2 4 4 3 0 5 2 0 1 2 3.003
1788 MATH 231 Linear Algebra I JIANG, Y 28 1 2 1 6 1 0 1 1 2 3 2 7 2.460
1789 MATH 231 Linear Algebra I JOSEPH, M 30 1 2 2 2 2 2 0 4 3 0 3 9 2.405
1790 MATH 231 Linear Algebra I JOSEPH, M 30 0 1 1 2 2 5 2 1 3 1 3 9 2.214
1791 MATH 231 Linear Algebra I JIANG, Y 28 1 3 0 2 0 2 4 1 1 1 4 8 2.205
1792 MATH 231 Linear Algebra I VLAMIS, N 30 1 1 0 0 1 2 0 7 5 0 3 10 1.945
1793 MATH 231 Linear Algebra I RONG, Y 22 0 0 0 0 3 0 4 4 1 4 1 5 1.876
1794 MATH 231 Linear Algebra I PANDAZIS, M 32 1 0 0 2 2 2 3 2 3 7 2 8 1.875
1795 MATH 231 Linear Algebra I KAHAN, S 27 1 0 0 0 3 0 0 0 0 0 4 19 1.625
1796 MATH 231 Linear Algebra I KAHAN, S 30 1 0 1 0 1 2 1 1 2 1 10 10 1.240
1797 MATH 232 Linear Algebra II LEE, D 23 0 1 0 0 0 1 2 1 2 0 2 14 1.856
1798 MATH 241 Intro Prob & Math Stat TERILLA, J 25 1 14 0 0 5 3 0 1 0 0 0 1 3.546
1799 MATH 241 Intro Prob & Math Stat TERILLA, J 25 2 5 1 3 5 0 2 2 0 0 0 5 3.260
1800 MATH 241 Intro Prob & Math Stat GANGARAM, E 25 2 2 3 1 1 0 0 3 1 2 1 9 2.694
1801 MATH 241 Intro Prob & Math Stat PANDAZIS, M 31 0 2 1 4 3 2 0 5 2 2 2 7 2.378
1802 MATH 241 Intro Prob & Math Stat GANGARAM, E 25 1 1 4 0 1 1 1 3 0 0 4 9 2.300
1803 MATH 241 Intro Prob & Math Stat LIU, Z 30 3 5 0 3 1 0 0 2 1 0 7 7 2.300
1804 MATH 241 Intro Prob & Math Stat WANG, A 30 3 2 2 3 0 0 2 3 1 1 9 4 1.946
1805 MATH 241 Intro Prob & Math Stat WANG, A 24 2 1 0 1 2 0 0 3 1 0 6 8 1.813
1806 MATH 241 Intro Prob & Math Stat KOROVESHI, B 26 0 0 1 0 1 0 2 2 6 0 5 9 1.500
1807 MATH 241 Intro Prob & Math Stat KOROVESHI, B 26 0 0 1 0 0 0 2 1 6 0 5 11 1.367
1808 MATH 242 Methods Of Math Statistics SISSER, F 30 1 2 3 4 4 6 0 1 3 0 3 3 2.652
1809 MATH 242 Methods Of Math Statistics SISSER, F 30 3 2 0 2 6 2 2 3 3 0 4 3 2.433
1810 MATH 245 Mathematical Models OVCHINNIKOV, A 23 2 6 3 5 1 3 1 0 0 0 1 1 3.318
1811 MATH 247 Lin Prog & Game Thy SISSER, F 30 2 9 1 3 3 2 1 1 1 0 1 6 3.250
1812 MATH 250 Mathematical Computing HANUSA, C 22 4 6 1 2 0 0 1 0 0 0 0 7 3.757
1813 MATH 301 Abstract Algebra I WILSON, S 12 0 2 0 2 1 1 1 1 1 0 1 2 2.630
1814 MATH 301 Abstract Algebra I VLAMIS, N 21 0 1 0 0 1 1 2 4 4 0 2 6 1.940
1815 MATH 305 Number Theory SABITOVA, M 18 1 1 0 0 6 0 0 1 0 2 1 6 2.500
1816 MATH 318 Foundations of Geometry KLOSIN, K 19 4 4 0 3 1 3 1 1 0 0 0 2 3.371
1817 MATH 320 Point-Set Topology KLOSIN, K 25 2 4 1 1 2 1 2 1 0 1 1 8 2.956
1818 MATH 524 History of Mathematics LORD, A 15 2 5 2 2 1 1 1 0 0 0 0 1 3.571
1819 MATH 605 Number Theory SABITOVA, M 10 0 4 0 0 3 0 0 1 0 0 0 2 3.375
1820 MATH 609 Axiomatic Set Theory MITRA, S 20 1 1 4 9 2 1 0 0 0 0 0 2 3.400
1821 MATH 618 Foundations of Geometry. KLOSIN, K 16 0 4 0 3 1 1 2 1 1 0 1 2 2.850
1822 MATH 625 Numerical Analysis II OVCHINNIKOV, A 11 4 5 0 0 0 1 0 0 0 0 1 0 3.518
1823 MATH 114W Elementary Prob&Stat CAI, A 30 6 0 3 5 4 2 2 1 1 0 1 5 3.092
1824 MATH 114W Elementary Prob&Stat RICCARDO, M 20 2 3 1 4 3 0 0 3 1 1 1 1 2.874
1825 MATH 385W Math Found Sec Educ ARTZT, A 12 0 1 4 4 3 0 0 0 0 0 0 0 3.417
1826 MATH 385W Math Found Sec Educ MARKINSON, M 10 0 0 1 2 3 0 2 0 1 0 0 1 2.844
In [5]:
CourseNumberPattern = r'^[1-3][0-9]{2}W?$'
math_df = math_df[math_df['NBR'].str.contains(CourseNumberPattern)]
math_df_results = calculate_average_gpas(math_df)
math_df_results
Average GPA for this entire subject in Spring 2023 is: 2.3, which is a C+
The hardest class based on average GPA in Spring 2023 is class number: 143 with an average GPA of 1.7, which is a C-

Standard deviation tells us about the spread of the grades that students received in each class. A higher standard deviation indicates a wider range of grades, while a lower standard deviation indicates that grades were more closely clustered around the average.
Out[5]:
CLASS NUMBER PROF AVG GPA PROF AVG GPA PROF LETTER STD DEV GPA PROF
0 110 ALI, M 3.5 B+ 0.69
1 110 LASKER, M 2.9 B- 1.17
2 110 GILLMAN, P 1.3 D 1.31
3 110 All Professors 2.5 C+ 1.48
4 114 CHOW, J 3.0 B 0.98
5 115 ALI, M 3.4 B+ 0.90
6 115 UDDIN, J 2.8 B- 1.35
7 115 NAKAYAMA, A 2.6 C+ 1.44
8 115 JOANIDHI, Z 2.6 C+ 1.29
9 115 OSTROWSKY, A 2.5 C+ 1.37
10 115 TOBAR, J 1.9 C- 1.15
11 115 XU, R 2.1 C 1.22
12 115 LEHMAN, S 1.8 C- 1.21
13 115 KALRA, P 2.0 C 1.36
14 115 BERGER, K 1.8 C- 1.53
15 115 BOTEJU, W 1.5 D 1.47
16 115 PORCHETTA, E 1.5 D 1.52
17 115 WOLF-SONKIN, V 1.0 D 1.36
18 115 SHEN, T 1.1 D 1.24
19 115 All Professors 1.9 C- 1.48
20 119 GREENMAN, J 3.2 B 1.01
21 119 RICCARDO, M 3.1 B 1.09
22 119 KLOSIN, K 2.9 B- 1.18
23 119 CHOW, J 2.7 B- 1.32
24 119 BERGER, K 2.7 B- 1.26
25 119 LIN, Y 2.6 C+ 1.31
26 119 LI, H 1.9 C- 1.40
27 119 All Professors 2.7 B- 1.29
28 120 TERILLA, J 3.1 B 1.02
29 120 GOLDMAN, S 3.0 B 0.92
30 120 GONZALEZ, R 2.3 C+ 1.21
31 120 LEE, H 2.6 C+ 0.81
32 120 LEE, D 2.5 C+ 1.07
33 120 TOBAR, J 2.5 C+ 1.40
34 120 BERGER, K 2.4 C+ 1.24
35 120 SABITOVA, M 2.0 C 1.25
36 120 SHEN, T 1.8 C- 1.17
37 120 BOTEJU, W 1.8 C- 1.44
38 120 All Professors 2.4 C+ 1.24
39 122 CAI, A 3.5 B+ 0.68
40 122 BROGES, A 2.8 B- 1.04
41 122 LIU, Z 2.7 B- 1.01
42 122 COLON, C 2.6 C+ 1.41
43 122 SPITZ, H 2.5 C+ 1.28
44 122 ARCHETTI, M 2.5 C+ 1.28
45 122 OZKAN, E 2.1 C 1.28
46 122 MARKOWITZ, E 2.5 C+ 1.31
47 122 FLYNN, D 2.4 C+ 1.10
48 122 JOSEPH, M 2.3 C+ 1.55
49 122 TOLEDO, D 1.9 C- 1.58
50 122 BEGA, J 1.8 C- 1.28
51 122 LEE, H 2.2 C 0.96
52 122 LEE, D 2.0 C 1.16
53 122 CLARKE, A 1.4 D 1.34
54 122 YUABOV, D 1.7 C- 1.69
55 122 DHARMA, J 1.3 D 1.44
56 122 GANT, S 1.2 D 1.42
57 122 All Professors 2.1 C 1.40
58 128 HANUSA, C 3.3 B+ 1.07
59 131 GJONLEKAJ, M 3.1 B 1.02
60 131 GREENMAN, J 2.1 C 1.39
61 131 All Professors 2.3 C+ 1.38
62 132 GOLDMAN, S 2.7 B- 1.29
63 141 SULTAN, Z 3.4 B+ 0.62
64 141 WEN, C 2.9 B- 1.17
65 141 ERLBAUM, S 2.8 B- 1.18
66 141 FLYNN, D 2.8 B- 1.04
67 141 KALRA, P 2.6 C+ 0.81
68 141 LORD, A 2.5 C+ 1.46
69 141 BROGES, A 2.5 C+ 1.43
70 141 WANG, A 2.3 C+ 1.45
71 141 LI, H 2.3 C+ 1.16
72 141 KIMATOV, M 2.2 C 1.41
73 141 MILLER, R 1.8 C- 1.03
74 141 LEE, D 1.8 C- 1.28
75 141 NICASTRO, S 1.8 C- 1.35
76 141 NEVAREZ, B 1.6 D 1.33
77 141 GANT, S 1.5 D 0.94
78 141 All Professors 2.4 C+ 1.32
79 142 ERLBAUM, S 2.8 B- 1.20
80 142 RONG, Y 2.0 C 1.13
81 142 GANGARAM, E 1.9 C- 1.17
82 142 KOROVESHI, B 1.7 C- 1.14
83 142 All Professors 2.2 C 1.26
84 143 ERLBAUM, S 2.1 C 1.42
85 143 WILSON, S 2.0 C 1.13
86 143 BRAUN, M 1.6 D 1.54
87 143 ADRIAN, M 1.6 D 1.42
88 143 BERMAN, G 1.3 D 1.41
89 143 All Professors 1.7 C- 1.45
90 151 SPITZ, H 1.8 C- 1.43
91 151 SABITOVA, M 1.9 C- 1.51
92 151 All Professors 1.9 C- 1.46
93 152 ZAKERI, S 2.4 C+ 1.33
94 152 MILLER, D 1.8 C- 1.50
95 152 NEVAREZ, B 1.9 C- 1.48
96 152 DHARMA, J 1.0 D 1.21
97 152 All Professors 1.8 C- 1.47
98 201 MITRA, S 3.0 B 0.62
99 201 JOSEPH, M 2.8 B- 1.20
100 201 BERMAN, G 2.0 C 1.40
101 201 All Professors 2.6 C+ 1.17
102 202 SARIC, D 2.8 B- 1.38
103 202 ADRIAN, M 2.5 C+ 1.17
104 202 All Professors 2.6 C+ 1.24
105 205 GANGARAM, E 2.4 C+ 0.84
106 220 MILLER, D 3.2 B 0.75
107 223 BRAUN, M 2.0 C 1.47
108 231 ZAKERI, S 3.0 B 0.97
109 231 JIANG, Y 2.3 C+ 1.35
110 231 JOSEPH, M 2.3 C+ 1.20
111 231 VLAMIS, N 1.9 C- 1.06
112 231 RONG, Y 1.9 C- 0.81
113 231 PANDAZIS, M 1.9 C- 1.03
114 231 KAHAN, S 1.4 D 1.48
115 231 All Professors 2.1 C 1.28
116 232 LEE, D 1.9 C- 1.19
117 241 TERILLA, J 3.4 B+ 0.66
118 241 GANGARAM, E 2.5 C+ 1.40
119 241 PANDAZIS, M 2.4 C+ 1.11
120 241 LIU, Z 2.3 C+ 1.71
121 241 WANG, A 1.9 C- 1.60
122 241 KOROVESHI, B 1.4 D 1.09
123 241 All Professors 2.3 C+ 1.44
124 242 SISSER, F 2.5 C+ 1.20
125 245 OVCHINNIKOV, A 3.3 B+ 0.89
126 247 SISSER, F 3.2 B 0.97
127 250 HANUSA, C 3.8 A- 0.47
128 301 WILSON, S 2.6 C+ 1.14
129 301 VLAMIS, N 1.9 C- 0.97
130 301 All Professors 2.3 C+ 1.09
131 305 SABITOVA, M 2.5 C+ 1.19
132 318 KLOSIN, K 3.4 B+ 0.67
133 320 KLOSIN, K 3.0 B 1.16
134 114W CAI, A 3.1 B 0.91
135 114W RICCARDO, M 2.9 B- 1.11
136 114W All Professors 3.0 B 1.00
137 385W ARTZT, A 3.4 B+ 0.32
138 385W MARKINSON, M 2.8 B- 0.59
139 385W All Professors 3.1 B 0.54
In [6]:
import matplotlib.pyplot as plt
import seaborn as sns

plt.figure()
all_prof_df_results = math_df_results[math_df_results["PROF"] == 'All Professors']
sns.histplot(all_prof_df_results["STD DEV GPA PROF"], kde=True, color='skyblue')
plt.axvline(all_prof_df_results["STD DEV GPA PROF"].mean(), color='red', linestyle='dashed', linewidth=1, label='Mean')
min_ylim, max_ylim = plt.ylim()
plt.text(all_prof_df_results["STD DEV GPA PROF"].mean()*1.12, max_ylim*0.9, 'Mean: {:.2f}'.format(all_prof_df_results["STD DEV GPA PROF"].mean()))

# Generate a color palette with as many colors as classes
colors = sns.color_palette("husl", len(all_prof_df_results))

for idx, (_, row) in enumerate(all_prof_df_results.iterrows()):
    plt.axvline(row["STD DEV GPA PROF"], color=colors[idx], linestyle='dotted', linewidth=0.5, label=row["CLASS NUMBER"])

plt.title("Distribution of Standard Deviations of GPAs")
plt.xlabel("Standard Deviation")
plt.ylabel("Frequency")
plt.legend(loc='upper right', bbox_to_anchor=(1.3, 1))  # Adjusted the location to ensure it doesn't overlap with the plot
plt.show()
In [7]:
teacher_math_df_results = calculate_teacher_gpas(math_df)
teacher_math_df_results
Professors who teach more than one class, have a GPA that is the same or higher than the subject average GPA (2.3), and have a withdrawal percentage that is less or equal than the subject average withdrawal percentage (24.78%):

           PROF  AVG GPA PROF AVG GPA PROF LETTER  STD DEV GPA PROF  \
1        ALI, M           3.5                  B+               0.8   
5     BERGER, K           2.3                  C+               1.4   
9     BROGES, A           2.7                  B-               1.3   
10       CAI, A           3.3                  B+               0.8   
11      CHOW, J           2.8                  B-               1.3   
15   ERLBAUM, S           2.6                  C+               1.3   
16     FLYNN, D           2.6                  C+               1.1   
21   GOLDMAN, S           2.9                  B-               1.0   
29     KALRA, P           2.3                  C+               1.1   
31    KLOSIN, K           3.1                   B               1.1   
35       LEE, H           2.4                  C+               0.9   
39       LIU, Z           2.5                  C+               1.4   
54  RICCARDO, M           3.0                   B               1.1   
59    SISSER, F           2.8                  B-               1.2   
62   TERILLA, J           3.3                  B+               0.8   
68       WEN, C           2.9                  B-               1.2   
69    WILSON, S           2.3                  C+               1.2   
73    ZAKERI, S           2.7                  B-               1.2   

    NUM OF CLASSES  WITHDRAW PERCENTAGE  
1                3                 16.5  
5                3                 22.7  
9                2                 15.0  
10               2                  9.1  
11               3                 12.7  
15               4                 17.6  
16               2                  7.9  
21               2                 12.2  
29               2                 18.9  
31               3                 14.1  
35               2                 11.6  
39               2                 20.8  
54               2                 10.0  
59               3                 13.3  
62               3                 10.7  
68               2                 20.0  
69               2                 19.4  
73               2                 12.5   

Note: This ignores rate my professor ratings. This is soley based on GPA and it doesn't consider how much students actually learn from these teachers!
Average standard deviation of GPA for all teachers in this subject in Spring 2023 is: 1.4
Out[7]:
PROF AVG GPA PROF AVG GPA PROF LETTER STD DEV GPA PROF NUM OF CLASSES WITHDRAW PERCENTAGE
0 ADRIAN, M 2.1 C 1.4 2 24.1
1 ALI, M 3.5 B+ 0.8 3 16.5
2 ARCHETTI, M 2.5 C+ 1.3 1 23.3
3 ARTZT, A 3.4 B+ 0.3 1 0.0
4 BEGA, J 1.8 C- 1.3 2 34.8
5 BERGER, K 2.3 C+ 1.4 3 22.7
6 BERMAN, G 1.6 D 1.4 2 5.7
7 BOTEJU, W 1.6 D 1.5 3 24.8
8 BRAUN, M 1.7 C- 1.5 3 8.0
9 BROGES, A 2.7 B- 1.3 2 15.0
10 CAI, A 3.3 B+ 0.8 2 9.1
11 CHOW, J 2.8 B- 1.3 3 12.7
12 CLARKE, A 1.4 D 1.3 2 48.7
13 COLON, C 2.6 C+ 1.4 1 36.0
14 DHARMA, J 1.2 D 1.4 3 40.3
15 ERLBAUM, S 2.6 C+ 1.3 4 17.6
16 FLYNN, D 2.6 C+ 1.1 2 7.9
17 GANGARAM, E 2.3 C+ 1.3 4 28.9
18 GANT, S 1.4 D 1.2 2 37.3
19 GILLMAN, P 1.3 D 1.3 2 27.5
20 GJONLEKAJ, M 3.1 B 1.0 1 25.0
21 GOLDMAN, S 2.9 B- 1.0 2 12.2
22 GONZALEZ, R 2.3 C+ 1.2 3 29.5
23 GREENMAN, J 2.3 C+ 1.4 4 26.0
24 HANUSA, C 3.5 B+ 0.9 2 37.8
25 JIANG, Y 2.3 C+ 1.3 2 26.8
26 JOANIDHI, Z 2.6 C+ 1.3 1 25.0
27 JOSEPH, M 2.4 C+ 1.3 4 33.9
28 KAHAN, S 1.4 D 1.5 2 50.9
29 KALRA, P 2.3 C+ 1.1 2 18.9
30 KIMATOV, M 2.2 C 1.4 1 16.7
31 KLOSIN, K 3.1 B 1.1 3 14.1
32 KOROVESHI, B 1.6 D 1.1 4 24.5
33 LASKER, M 2.9 B- 1.2 1 12.5
34 LEE, D 2.0 C 1.2 4 33.0
35 LEE, H 2.4 C+ 0.9 2 11.6
36 LEHMAN, S 1.8 C- 1.2 2 25.7
37 LI, H 2.1 C 1.3 2 23.3
38 LIN, Y 2.6 C+ 1.3 1 18.2
39 LIU, Z 2.5 C+ 1.4 2 20.8
40 LORD, A 2.5 C+ 1.5 1 31.0
41 MARKINSON, M 2.8 B- 0.6 1 10.0
42 MARKOWITZ, E 2.5 C+ 1.3 1 21.2
43 MILLER, D 2.2 C 1.5 3 31.3
44 MILLER, R 1.8 C- 1.0 1 48.3
45 MITRA, S 3.0 B 0.6 1 0.0
46 NAKAYAMA, A 2.6 C+ 1.4 1 17.1
47 NEVAREZ, B 1.7 C- 1.4 2 38.7
48 NICASTRO, S 1.8 C- 1.4 1 17.2
49 OSTROWSKY, A 2.5 C+ 1.4 1 29.6
50 OVCHINNIKOV, A 3.3 B+ 0.9 1 4.3
51 OZKAN, E 2.1 C 1.3 2 36.9
52 PANDAZIS, M 2.1 C 1.1 2 23.8
53 PORCHETTA, E 1.5 D 1.5 1 30.0
54 RICCARDO, M 3.0 B 1.1 2 10.0
55 RONG, Y 1.9 C- 1.0 2 17.0
56 SABITOVA, M 2.1 C 1.4 3 28.6
57 SARIC, D 2.8 B- 1.4 1 7.7
58 SHEN, T 1.5 D 1.2 2 26.8
59 SISSER, F 2.8 B- 1.2 3 13.3
60 SPITZ, H 2.0 C 1.4 3 25.3
61 SULTAN, Z 3.4 B+ 0.6 1 26.7
62 TERILLA, J 3.3 B+ 0.8 3 10.7
63 TOBAR, J 2.1 C 1.3 3 37.2
64 TOLEDO, D 1.9 C- 1.6 2 49.2
65 UDDIN, J 2.8 B- 1.4 1 8.7
66 VLAMIS, N 1.9 C- 1.0 2 31.4
67 WANG, A 2.0 C 1.6 3 22.6
68 WEN, C 2.9 B- 1.2 2 20.0
69 WILSON, S 2.3 C+ 1.2 2 19.4
70 WOLF-SONKIN, V 1.0 D 1.4 2 47.4
71 XU, R 2.1 C 1.2 1 5.0
72 YUABOV, D 1.7 C- 1.7 1 47.1
73 ZAKERI, S 2.7 B- 1.2 2 12.5

Note¶

To actually interact with plot below and be able to hover over plots and see which teacher its referring to, download the html version of this file instead¶

In [8]:
import plotly.express as px

# Set the overall average GPA
mean_gpa = 2.3

# Create the scatter plot using Plotly Express
fig = px.scatter(teacher_math_df_results, 
                 x=list(range(len(teacher_math_df_results))),
                 y='AVG GPA PROF',
                 hover_name='PROF', # This will show the professor's name when hovering over a point
                 title="Math Professor GPA Averages vs Math Subject Average GPA",
                 labels={'x': 'Professor (By Index Above)', 'y': 'Average GPA'},
                 size_max=100)

# Add a line for the average GPA
fig.add_shape(
    type='line',
    line=dict(dash='dash', color='red'),
    x0=0,
    x1=len(teacher_math_df_results),
    y0=mean_gpa,
    y1=mean_gpa,
)

# Show the plot
fig.show()

Teacher Analysis¶

Most of the teachers above make sense based off their Rate My Professor:¶

  • Meimona Ali (https://www.ratemyprofessors.com/professor/2107629)
  • Adele M. Broges (https://www.ratemyprofessors.com/professor/487526)
  • Anhong Cai (https://www.ratemyprofessors.com/professor/835045)
  • Sharon Erlbaum (https://www.ratemyprofessors.com/professor/277455)
  • Desmond Flynn (https://www.ratemyprofessors.com/professor/2838676)
  • Steven Goldman (https://www.ratemyprofessors.com/professor/1786967)
  • Priya Kalra (https://www.ratemyprofessors.com/professor/399770)
  • Krzysztof Klosin (https://www.ratemyprofessors.com/professor/1650543)
  • Zong Wang Liu (https://www.ratemyprofessors.com/professor/1780502)
  • Alexey Ovchinnikov (https://www.ratemyprofessors.com/professor/1312135)
  • Michael Riccardo (https://www.ratemyprofessors.com/professor/2683506)
  • Fern Sisser (https://www.ratemyprofessors.com/professor/22553)
  • John Terilla (https://www.ratemyprofessors.com/professor/498381)
  • Chengcheng Wen (https://www.ratemyprofessors.com/professor/1849928)
  • Scott Wilson (https://www.ratemyprofessors.com/professor/1157817)
  • Saeed Zakeri (https://www.ratemyprofessors.com/professor/437173) - many students would consider him the best and most sought out math professor in the department

Other's don't:¶

  • Kirsten Berger (https://www.ratemyprofessors.com/professor/1820251)
  • James Chow (https://www.ratemyprofessors.com/professor/2535536)
  • Hye Lee (https://www.ratemyprofessors.com/professor/2512450)
  • Alexander Lord (https://www.ratemyprofessors.com/professor/2348100)
  • Sudeb Mitra (https://www.ratemyprofessors.com/professor/251325)

Couldn't find any info on this professor:¶

  • Cleary, J (no rmp or sight of them on department website)

Teachers that missed the mark because of gpa, withdrawal rate, and/or only teaching one class, but they have a rate my professor of 4 and above:¶

  • Clarke Anisha (https://www.ratemyprofessors.com/professor/1327948)
  • Michael Archetti (https://www.ratemyprofessors.com/professor/2576269)
  • Anisha Clarke (https://www.ratemyprofessors.com/professor/1327948)
  • Elliot Gangaram (https://www.ratemyprofessors.com/professor/2187985)
  • Sara Gant (https://www.ratemyprofessors.com/professor/2601844)
  • Maria Duravcevic Gjonlekaj (https://www.ratemyprofessors.com/professor/1396526)
  • Jennifer Greenman (https://www.ratemyprofessors.com/professor/1840079)
  • Michael Joseph (https://www.ratemyprofessors.com/professor/1953691)
  • Mikhail Kimatov (https://www.ratemyprofessors.com/professor/2243897)
  • Maksud Lasker (https://www.ratemyprofessors.com/professor/1401777)
  • David Lee (https://www.ratemyprofessors.com/professor/506662)
  • Seth Lehman (https://www.ratemyprofessors.com/professor/2447352)
  • Yunyun Lin (https://www.ratemyprofessors.com/professor/2605426)
  • Elena Markowitz (https://www.ratemyprofessors.com/professor/1957987)
  • Akina Nakayama (https://www.ratemyprofessors.com/professor/1868969)
  • Bryan Nevarez (https://www.ratemyprofessors.com/professor/2358922)
  • Stephen Nicastro (https://www.ratemyprofessors.com/professor/2383738)
  • Ernest Prochetta (https://www.ratemyprofessors.com/professor/2044631)
  • Tracy Shen (https://www.ratemyprofessors.com/professor/2753724)
  • Henya Spitz (https://www.ratemyprofessors.com/professor/405353) - Giving it to her because she sits currently at 3.9 and has almost 200 rmp ratings
  • Alan Sultan (https://www.ratemyprofessors.com/professor/98650)
  • Jessica Tobar (https://www.ratemyprofessors.com/professor/2840976)
  • Adam Wang (https://www.ratemyprofessors.com/professor/2148901)
  • Daniel Yuabov (https://www.ratemyprofessors.com/professor/1405223)
In [9]:
# Count the number of classes with an average GPA at or greater than 3.0 and those less than 3.0
green_percentage = teacher_math_df_results[teacher_math_df_results['AVG GPA PROF'] >= 3.0].shape[0]
red_percentage = teacher_math_df_results[teacher_math_df_results['AVG GPA PROF'] < 3.0].shape[0]

# Create the values and labels for the pie chart
values = [green_percentage, red_percentage]
labels = ['At or above 3.0 (B or above)', 'At or below 2.7 (B- or below)']

# Define the colors for each section (green and red)
colors = ['#77dd77', '#ff6961']

# Plot the pie chart
plt.figure(figsize = (6, 6))
plt.pie(values, labels = labels, colors = colors, autopct = '%1.1f%%')

# Set the title
plt.title("Average GPA of all MATH Teachers")

# Show the plot
plt.show()

Class Description/Analysis¶

The hardest class based on average GPA is class number: 143 with an average GPA of 1.7, which is a C-¶

MATH 110 (Mathematical Literacy: An Introduction to College Mathematics) - Mathematical literacy is necessary for success in today’s highly technological society. Students will gain hands-on experience in solving real world problems in such diverse areas as law, medicine, and politics. Applications include analysis of election results and voting schemes, interpretation of medical data, and study of the nature of fair political representation. Mathematical topics covered will include an introduction to probability and statistics through normal curves and confidence intervals; exponential and logistic growth models; and the algebraic skills necessary for all the applications covered. Extensive use will also be made of today’s sophisticated graphing calculators. Successful completion of the course satisfies the Basic Skills Requirement in Mathematics and prepares students for MATH 113, 114, 116, and 119. Not open to students who are taking or have received credit, including transfer credit or advanced placement credit, for any precalculus or calculus course

Professors:

  • Meimona Ali, AVG GPA: 3.5 (https://www.ratemyprofessors.com/professor/2107629)
  • Maksud Lasker, AVG GPA: 2.9 (https://www.ratemyprofessors.com/professor/1401777)
  • Paula Gillman, AVG GPA: 1.3 (https://www.ratemyprofessors.com/professor/1692881)

General Average GPA for Math 110:

  • 2.5 which is a C+

MATH 114 (Elementary Prob and Stats) - An introduction to mathematical probability and statistics for the general student. Not open to mathematics, physics, or chemistry majors, or to students receiving credit for MATH 114W, 241, 611, 621, or 633

Professor:

  • James Chow, AVG GPA: 3.0 (https://www.ratemyprofessors.com/professor/2447352) which is a B

MATH 114W (Elementary Probability and Statistics) - An introduction to mathematical probability and statistics for the general student with a writing-intensive component. Includes the material in MATH 114, as well as additional topics such as sampling methods, research design, and composing and conducting surveys, explored through student research and writing assignments. Not open to mathematics, physics, or chemistry majors, or to students who are taking or have passed MATH 114, 241, 611, 621, 633, BIOL 230, ECON 249, PSYCH 107, SOC 205, 206, 207. Not open to students who will be receiving transfer credit or advanced placement credit for MATH 114

Professors:

  • Anhong Cai, AVG GPA: 3.1 (https://www.ratemyprofessors.com/professor/835045)
  • Michael Riccardo, AVG GPA: 2.9 (https://www.ratemyprofessors.com/professor/2683506)

General Average GPA for MATH 114W:

  • 3.0 which is a B

MATH 115 (College Algebra for Precalculus) - Topics include linear, polynomial, rational, and radical expressions as mathematical models; solving equations and systems of equations that arise through the application of these models. Not open to students who are taking or have received credit, including transfer credit or advanced placement credit, for any precalculus or calculus course. Students who fail or withdraw from this course multiple times may be prohibited from majoring in the sciences or mathematics; see the bulletin language for your major

Professors:

  • Meimona Ali, AVG GPA: 3.4 (https://www.ratemyprofessors.com/professor/2107629)
  • Jasim Uddin, AVG GPA: 2.8 (https://www.ratemyprofessors.com/professor/1149432)
  • Zhani Joanidhi, AVG GPA: 2.6 (https://www.ratemyprofessors.com/professor/2365144)
  • Akina Nakayama, AVG GPA: 2.6 (https://www.ratemyprofessors.com/professor/1868969)
  • Andrew Ostowsky, AVG GPA: 2.5 (https://www.ratemyprofessors.com/professor/1309716)
  • Ruipeng Xu, AVG GPA: 2.1 (https://www.ratemyprofessors.com/professor/2880021)
  • Priya Kalra, AVG GPA: 2.0 (https://www.ratemyprofessors.com/professor/399770)
  • Jessica Tobar, AVG GPA: 1.9 (https://www.ratemyprofessors.com/professor/2840976)
  • Seth Lehman, AVG GPA: 1.8 (https://www.ratemyprofessors.com/professor/2447352)
  • Kirsten Berger, AVG GPA: 1.8 (https://www.ratemyprofessors.com/professor/1820251)
  • Wjeewani Boteju, AVG GPA: 1.5 (https://www.ratemyprofessors.com/professor/2634956)
  • Ernest Prochetta, AVG GPA: 1.5 (https://www.ratemyprofessors.com/professor/2044631)
  • Tracy Shen, AVG GPA: 1.1 (No RMP)
  • Valerie Wolf Sonkin, AVG GPA: 1.0 (https://www.ratemyprofessors.com/professor/643077)

General Average GPA for MATH 115:

  • 1.9 which is a C-

MATH 119 (Math for Elementary School Teachers) - This course is designed to make prospective elementary schoolteachers aware of the beauty, meaning, and relevance of mathematics. Topics are taken from those areas of mathematics that are related to the elementary school curriculum, and emphasis is placed on clearing up common misunderstandings of mathematical concepts and results

Professors:

  • Jennifer Greenman, AVG GPA: 3.2 (https://www.ratemyprofessors.com/professor/1840079)
  • Michael Riccardo, AVG GPA: 3.1 (https://www.ratemyprofessors.com/professor/2683506)
  • Krzysztof Klosin, AVG GPA: 2.9 (https://www.ratemyprofessors.com/professor/1650543)
  • James Chow, AVG GPA: 2.7 (https://www.ratemyprofessors.com/professor/2535536)
  • Kirsten Berger, AVG GPA: 2.7 (https://www.ratemyprofessors.com/professor/1820251)
  • Yunyun Lin, AVG GPA: 2.6 (https://www.ratemyprofessors.com/professor/2605426)
  • Huifei Li, AVG GPA: 1.9 (https://www.ratemyprofessors.com/professor/2456959)

General Average GPA for MATH 119:

  • 2.7 which is a B-

MATH 120 (Discrete Math for Computer Science) - This course provides fluency in foundational mathematical concepts that appear in future courses in computer science. This course is intended for computer science majors; it does not count toward a major or minor in mathematics. Topics include sets, basic combinatorics, functions, sequences, series, products, logarithms, divisibility, and modular arithmetic. Not open to students who are taking or who have received credit for CSCI 120 or MATH 220

Professors:

  • John Terilla, AVG GPA: 3.1 (https://www.ratemyprofessors.com/professor/498381)
  • Steven Goldman, AVG GPA: 3.0 (https://www.ratemyprofessors.com/professor/1786967)
  • Hye Lee, AVG GPA: 2.6 (https://www.ratemyprofessors.com/professor/2512450)
  • David Lee, AVG GPA: 2.5 (https://www.ratemyprofessors.com/professor/506662)
  • Jessica Tobar, AVG GPA: 2.5 (https://www.ratemyprofessors.com/professor/2840976)
  • Kirsten Berger, AVG GPA: 2.4 (https://www.ratemyprofessors.com/professor/1820251)
  • Ricardo Gonzalez, AVG GPA: 2.3 (https://www.ratemyprofessors.com/professor/2350533)
  • Maria Sabitova, AVG GPA: 2.0 (https://www.ratemyprofessors.com/professor/1312130)
  • Tracy Shen, AVG GPA: 1.8 (No RMP)
  • Wjeewani Boteju, AVG GPA: 1.8 (https://www.ratemyprofessors.com/professor/2634956)

General Average GPA for MATH 120:

  • 2.4 which is a C+

MATH 122 (Precalculus) - This course offers a thorough introduction to the topics required for calculus. Topics include real and complex numbers, algebra of functions, the fundamental theorem of algebra, trigonometry, logarithms and exponential functions, conic sections, and the use of graphic calculators. Students unsure of their preparation for calculus are advised to take the Queens College mathematics placement test

Professors:

  • Anhong Cai, AVG GPA: 3.5 (https://www.ratemyprofessors.com/professor/835045)
  • Adele M. Broges, AVG GPA: 2.8 (https://www.ratemyprofessors.com/professor/487526)
  • Zong Wang Liu, AVG GPA: 2.7 (https://www.ratemyprofessors.com/professor/1780502)
  • Chelsea Colón, AVG GPA: 2.6 (https://www.ratemyprofessors.com/professor/2658423)
  • Henya Spitz, AVG GPA: 2.5 (https://www.ratemyprofessors.com/professor/405353)
  • Michael Archetti, AVG GPA: 2.5 (https://www.ratemyprofessors.com/professor/2576269)
  • Elena Markowitz, AVG GPA: 2.5 (https://www.ratemyprofessors.com/professor/1957987)
  • Desmond Flynn, AVG GPA: 2.4 (https://www.ratemyprofessors.com/professor/2838676)
  • Michael Joseph, AVG GPA: 2.3 (https://www.ratemyprofessors.com/professor/1953691)
  • Hye Lee, AVG GPA: 2.2 (https://www.ratemyprofessors.com/professor/2512450)
  • Erdem Ozkan, AVG GPA: 2.1 (https://www.ratemyprofessors.com/professor/2912151)
  • David Lee, AVG GPA: 2.0 (https://www.ratemyprofessors.com/professor/506662)
  • David Toledo, AVG GPA: 1.9 (https://www.ratemyprofessors.com/professor/405219)
  • Julian Bega, AVG GPA: 1.8 (https://www.ratemyprofessors.com/professor/2819605)
  • Daniel Yuabov, AVG GPA: 1.7 (https://www.ratemyprofessors.com/professor/1405223)
  • Anisha Clarke, AVG GPA: 1.4 (https://www.ratemyprofessors.com/professor/1081991)
  • Joh Dharma, AVG GPA: 1.3 (https://www.ratemyprofessors.com/professor/2819735)
  • Sara Gant, AVG GPA: 1.2 (https://www.ratemyprofessors.com/professor/2601844)

General Average GPA for MATH 122:

  • 2.1 which is a C

MATH 128 (Mathematical Design) - Students will program computers to create digital art based on mathematical exploration of twodimensional geometry. Topics include transformations of the plane, trigonometric functions, polar coordinates, parametric functions, and Mobius transformations. No prior experience in programming is necessary

Professor:

  • Christoper Hanusa, AVG GPA: 3.3 (https://www.ratemyprofessors.com/professor/1157814) which is a B+

MATH 131 (Calculus with Applications to Social Sciences 1) - Introduction of the fundamental ideas and techniques of calculus to nonscience students. Special emphasis is given to applications. Topics include functions and graphs; derivatives and differentiation techniques; the marginal concept in economics; optimization methods; compound interest; exponential and logarithmic functions. Not open to students who are taking any other calculus course or have received credit, including transfer credit or advanced placement credit, forany calculus course. Students who fail or withdraw from this course multiple times may be prohibited from majoring in the sciences or mathematics; see the bulletin language for your major. Fall, Spring

Professors:

  • Maria Duravcevic Gjonlekaj, AVG GPA: 3.1 (https://www.ratemyprofessors.com/professor/1396526)
  • Jennifer Greenman, AVG GPA: 2.1 (https://www.ratemyprofessors.com/professor/1840079)

General Average GPA for MATH 131:

  • 2.3 which is a C+

MATH 132 (Calculus with Applications to Social Sciences 2) - A continuation of MATH 131. Topics include limits and continuity; mean value theorem; antiderivatives; integrals and integration techniques; applications of the definite integral; the calculus of logarithmic, exponential, and trigonometric functions. This course prepares students who have taken MATH 131 to continue into MATH 143. Students who fail or withdraw from this course multiple times may be prohibited from majoring in the sciences or mathematics; seethe bulletin language for your major

Professor:

  • Steven Goldman, AVG GPA: 2.7 (https://www.ratemyprofessors.com/professor/1786967) which is a B-

MATH 141 (Calculus-Differentiation) - The first part of a three-semester sequence (MATH 141, 142, 143) covering the same material as MATH 151 and 152. Credit is given for each course satisfactorily completed; a student need not take the entire sequence. Not open to students who are taking any other calculus course or have received credit, including transfer credit or advanced placement credit, for any calculus course. Students who failor withdraw from this course multiple times may be prohibited from majoring in the sciences or mathematics; see the bulletin language for your major. Fall, Spring (MQR)

Professors:

  • Z Sultan, AVG GPA: 3.4 (No RMP)
  • Chengcheng Wen, AVG GPA: 2.9 (https://www.ratemyprofessors.com/professor/1849928)
  • Sharon Erlbaum, AVG GPA: 2.8 (https://www.ratemyprofessors.com/professor/277455)
  • Desmond Flynn, AVG GPA: 2.8 (https://www.ratemyprofessors.com/professor/2838676)
  • Priya Kalra, AVG GPA: 2.6 (https://www.ratemyprofessors.com/professor/399770)
  • Alexander Lord, AVG GPA: 2.5 (https://www.ratemyprofessors.com/professor/2348100)
  • Adele M. Broges, AVG GPA: 2.5 (https://www.ratemyprofessors.com/professor/487526)
  • Adam Wang, AVG GPA: 2.3 (https://www.ratemyprofessors.com/professor/2148901)
  • Huifei Li, AVG GPA: 2.3 (https://www.ratemyprofessors.com/professor/2456959)
  • Mikhail Kimatov, AVG GPA: 2.2 (https://www.ratemyprofessors.com/professor/2243897)
  • Russell Miller, AVG GPA: 1.8 (https://www.ratemyprofessors.com/professor/311326)
  • Dan Lee, AVG GPA: 1.8 (https://www.ratemyprofessors.com/professor/1236017)
  • Stephen Nicastro, AVG GPA: 1.8 (https://www.ratemyprofessors.com/professor/2383738)
  • Bryan Nevarez, AVG GPA: 1.6 (https://www.ratemyprofessors.com/professor/2358922)
  • Sara Gant, AVG GPA: 1.5 (https://www.ratemyprofessors.com/professor/2601844)

General Average GPA for MATH 141:

  • 2.4 which is a C+

MATH 142 (Calculus-Integration) - A continuation of MATH 141. Not open to students who are taking any other calculus course or have received credit, including transfer credit or advanced placement credit, for any calculus course other than MATH 141 or MATH 151.Students who fail or withdraw from this course multiple times may be prohibited from majoring in the sciences or mathematics; see the bulletin language for your major. Fall, Spring (MQR)

Professors:

  • Sharon Erlbaum, AVG GPA: 2.8 (https://www.ratemyprofessors.com/professor/277455)
  • Yongwu Rong, AVG GPA: 2.0 (https://www.ratemyprofessors.com/professor/2685489)
  • Elliot Gangaram, AVG GPA: 1.9 (https://www.ratemyprofessors.com/professor/2187985)
  • Blendi Koroveshi, AVG GPA: 1.7 (https://www.ratemyprofessors.com/professor/555478)

General Average GPA for MATH 142:

  • 2.2 which is a C

MATH 143 (Calculus-Integration) - A continuation of MATH 142. Not open to students who are taking any other calculus course or have received credit, including transfer credit or advanced placement credit, for any calculus course other than MATH 131, MATH 132, MATH141, MATH 142 or MATH 151. Students who fail or withdraw from this course multiple times may be prohibited from majoring in the sciences or mathematics; see the bulletin language for your major. Fall, Spring (MQR)

Professors:

  • Sharon Erlbaum, AVG GPA: 2.1 (https://www.ratemyprofessors.com/professor/277455)
  • Scott Wilson, AVG GPA: 2.0 (https://www.ratemyprofessors.com/professor/1157817)
  • Yongwu Rong, AVG GPA: 2.0 (https://www.ratemyprofessors.com/professor/2685489)
  • Elliot Gangaram, AVG GPA: 1.9 (https://www.ratemyprofessors.com/professor/2187985)
  • Blendi Koroveshi, AVG GPA: 1.7 (https://www.ratemyprofessors.com/professor/555478)

General Average GPA for MATH 142:

  • 2.2 which is a C